<!DOCTYPE html>
<html lang="zh_en">
<head>
	<meta charset="UTF-8">
	<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
	<!-- <meta http-equiv="X-UA-Compatible" content="ie=edge"> -->
	<title>js操作DOM</title>
	<style>
		.easy {
			width: 200px;
			height: 200px;
			background: lightgoldenrodyellow;
		}
		.hard {
			background: lightsalmon;
			transition: 2s all;
		}
	</style>
</head>

<body>
	
</body>

<script>
	var body = document.querySelector('body');
	console.log(`1`);
	var cDiv = document.createElement('div');
	console.log(cDiv)
	console.log(`2`);
	body.appendChild(cDiv)
	console.log(body);
	cDiv.classList.add('easy')
	cDiv.clientLeft;
	cDiv.classList.add('hard')
	console.log(`3`);
	for(var i = 0;i<3000000000;i++);
	// setTimeout(() => {
	// 	cDiv.classList.add('hard')
	// }, 0)
	
	console.log(cDiv)
</script>


</html>